<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta name="description" content="">
    <meta http-equiv="x-dns-prefetch-control" content="on">

    <title>订单分配成功</title>
    <link href="../../css/css.css" rel="stylesheet" type="text/css">
    <script src="../../js/jquery-v1.11.2.min.js"></script>
    <script src="../../js/driver.js"></script>
    <script src="../../js/common.js"></script>
</head>
<body>
<section class="tabbtnarea">
    <li class="w50 rline" id="goOrder1">订单信息</li>
    <!--<li class="w33 rline" id="goOrder2">订单轨迹</li>-->
    <li class="w50"><span class="tabfouse">费用明细</span></li>
</section>
<section class="itemgroup mt44 p15">
    <div class="oneitem">
        <label class="gray">联系人:</label>
        <i class="iconfont rightsmallicon">&#xe6db;</i>
        <label class="right" id="consignName"></label>
    </div>
</section>
<section class="itemgroup mt10 p15">
    <div class="oneitem">
        <div class="gray left">总计行驶:</div>
        <div class="right"><label class="mr5" id="planDistance"></label>公里</div>
    </div>
    <div class="oneitem">
        <div class="gray left">起步价(含<span id="exceedDistance"></span>公里内):</div>
        <div class="right"><label class="red mr5" id="planStartFee"></label>元</div>
    </div>
    <div class="oneitem" style="display:none;">
        <div class="gray left">超里程费(含<span id="exceedDistance1"></span>公里内):</div>
        <div class="right"><label class="red mr5" id="planExceedFee"></label>元</div>
    </div>
    <div class="oneitem">
        <div class="gray left">超里程运价:</div>
        <div class="right"><label class="red mr5" id="planExceedPrice"></label>元/公里</div>
    </div>
    <div class="oneitem">
        <div class="gray left">等候时间:</div>
        <div class="right"><label class="mr5" id="planWaitTime"></label></div>
    </div>
    <div class="oneitem">
        <div class="gray left">特殊需求(搬运):</div>
        <div class="right"><label class="red mr5" id="planSpecialFee"></label>元</div>
    </div>
    <div class="oneitem" style="display:none;">
        <div class="gray left">装/卸货等待费用:</div>
        <div class="right"><label class="red mr5" id="planLoadFee"></label>元</div>
    </div>
    <div class="oneitem" style="display:none;">
        <div class="gray left">行驶途中等待费用:</div>
        <div class="right"><label class="red mr5" id="planLowSpeedFee"></label>元</div>
    </div>
</section>
<section class="detialbottom">
    <div class="cart_clear2 ml15">
        <span class="font12">总计向客户索取费用:</span>
        <span class="red font16" id="planTotalFee">￥${waybill.planTotalFee}</span>
    </div>
</section>
<script type="text/javascript">
    $(function () {
        //token验证
        checkDriverToken();
    });
    $(document).ready(function () {
        var waybillId = GetArgsFromHref("waybillId");
        var url = _global.serverHost + "/driver/bid_ok_detail3.htm";
        var data = {waybillId: waybillId};
        _callAjaxRequest(url, data, ajaxBack);

        function ajaxBack(data) {
            $("#consignName").html(data.waybill.consignName == "" ? data.waybill.consignMobile : data.waybill.consignName);
            $("#planDistance").html(data.waybill.planDistance);
            $("#planStartFee").html(data.waybill.planStartFee);
            $("#planExceedFee").html(data.waybill.planExceedFee);
            $("#planSpecialFee").html(data.waybill.planSpecialFee);
            $("#planTotalFee").html("￥" + data.waybill.planTotalFee);
            $("#planLowSpeedFee").html(data.waybill.planLowSpeedFee);
            $("#planLoadFee").html(data.waybill.planLoadFee*1+data.waybill.planUnloadFee*1);

            $("#goOrder1").attr("onclick", "goOrder1('" + data.waybill.waybillId + "')");
            $("#goOrder2").attr("onclick", "goOrder2('" + data.waybill.waybillId + "')");
            $("#exceedDistance").html(data.exceedDistance);
            $("#exceedDistance1").html(data.exceedDistance);
            $("#planExceedPrice").html(data.vehiclePrice.pv3);
            var ln_planWaitTime=data.waybill.planLoadTime-10+data.waybill.planUnloadTime+data.waybill.planLowSpeedTime;
            $("#planWaitTime").html(Number(ln_planWaitTime*60).formatTime());
        }
    });
    function goOrder1(waybillId) {
        window.location.href = "../bid/bid_ok_detail.html?waybillId=" + waybillId;
    }
    function goOrder2(waybillId) {
        window.location.href = "../bid/bid_ok_detail2.html?waybillId=" + waybillId;
    }
</script>
</body>
</html>